class FileIO:
    def __init__(self, filePath: str):
        self.path = filePath

    def ReadByte(self) -> bytes:
        with open(self.path, "rb") as f:
            return f.read()

    def WriteByte(self, data: bytes):
        with open(self.path, "wb") as f:
            f.write(data)

    def WriteText(self, data: str):
        with open(self.path, "w") as f:
            f.write(data)

    def WriteTexts(self, data: list[str]):
        with open(self.path, "w", encoding="utf-8") as f:
            for line in data:
                f.write(line + "\n")

    def ReadText(self) -> str:
        with open(self.path, "r") as f:
            return f.read()
